<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div class="modal-body">
  <input type="hidden" name="keyId" id="keyId" value="<s:property value="keyId" />">
  <fieldset>
    <legend>
      <span class="label  label-warning "> [请选择岗位信息]</span>
    </legend>
    <ul class="list-group" id="ajax_duty_query">
      <s:iterator value="dutyList" id="list">
        <li id="<s:property value="#list.id"/>" class="list-group-item">
          <div class="radio">
            <label >
              <input name="duty_query" id="<s:property value="#list.id"/>" type="radio" class="radiobox style-0">
              <span id="<s:property value="#list.id"/>"><s:property value="#list.department.name" /> - <s:property value="#list.post.name" /></span>
            </label>
          </div>
        </li>
      </s:iterator>
    </ul>
  </fieldset>
</div>
<div class="modal-footer">
  <button class="btn btn-primary" id="dialog-ok">确定</button>
</div>
<script>
  $(function(){
    $("div.modal-header > button.close").hide();
  });
  $("#dialog-ok").unbind("click").bind("click",function(){
    var obj = $("input[name=duty_query]:checked");
    var text = "<span id='"+$(obj).attr("id")+"'>当前操作人:【"+$(obj).next().html()+"】</span>";
    $("input#curDutyId").val($(obj).attr("id"));
    $("header#title").append(text);
    gDialog.fClose();
  });
</script>
